| 1. | The issues with the old memory model and a summary of the new memory model semantics can be found in the 中找到旧内存模型的问题以及对新内存模型语义的总结。 |
| 2. | At least the old memories of the east village spirit will always stay , transcending the passage of time 至少对于东村精神的久远回忆将永远驻留下去,超越时光的流逝。 |
| 3. | You learned how the code in listing 1 was not sufficient under the old memory model to guarantee that the correct value for 中,介绍了清单1的代码(在旧的内存模型中)是如何不足以保证线程b看到 |
| 4. | This is not what was intended , and it might not be possible on all jvms or platforms , but it was allowed by the old memory model specification 这并不是我们所想要的,而且在所有jvm或平台这是不可能的,但是旧的内存模型规范允许这样做。 |
| 5. | In other words , this means that the old memory model made promises only about the visibility of the variable being read or written , and no promises about the visibility of writes to other variables 换句话说,这意味着老的内存模型只保证正在读或写的变量的可见性,不保证写入其他变量的可见性。 |
| 6. | Were quite confusing , so much so that many knowledgeable developers chose to sometimes ignore the rules because writing properly synchronized code under the old memory model was so difficult 的语义很让人混淆,以致于许多有见地的开发者有时选择忽略这些规则,因为在旧的存储模型下编写正确同步的代码非常困难。 |
| 7. | But under the old memory model , in the absence of synchronization , it is possible for another thread to temporarily see the offset field as having the default value of 0 , and then later see the correct value of 4 但是在旧的内存模型下,在缺乏同步的情况下,有可能另一个线程会临时地看到偏移量字段具有初默认值0 ,而后又看到正确的值4 。 |
| 8. | Fortunately , it was possible to create a memory model that was more consistent with most developer s intuition while not breaking any code that was properly synchronized under the old memory model , and the jsr 133 process has done just that 幸运的是,我们可以在不破坏在旧的内存模型下正确同步的任何代码的同时,创建一个与大多数开发者的直觉更加一致的内存模型,并且这一切已经由jsr 133 process完成。 |
| 9. | Under the old memory model , this did not render double - checked locking thread - safe , because writes to a volatile field could still be reordered with writes to other nonvolatile fields such as the fields of the newly constructed object , and therefore the volatile instance reference could still hold a reference to an incompletely constructed object 。 )在旧的内存模型中,这不能使双重检查锁定成为线程安全的,因为对volatile字段的写仍然会与对其他nonvolatile字段的写(如新构造的对象的字段)一起重新排序,因而volatile实例引用仍然可能包含对一个未构造完的对象的引用。 |